<!DOCTYPE html>
<!--suppress ALL -->
<html lang="en" xmlns:th="http://www.thymeleaf.org"
        xmlns:shiro="http://www.thymeleaf.org/thymeleaf-extras-shiro">
<head>
    <meta charset="UTF-8">
    <title>Index</title>
</head>
<body>
    <p th:if="${session.loginMsg}==null">
        <a th:href="@{/toLogin}">登录</a>
    </p>
    <p th:if="${session.loginMsg}!=null">
        <a th:href="@{/logout}">退出登录</a>
    </p>
    <hr/>
    <a th:href="@{/user/toAdd}">跳转user add页面</a><br/>
    <a th:href="@{/user/toDelete}">跳转到user delete页面</a><br/>
    <a th:href="@{/user/toUpdate}">跳转到user update页面</a><br/>
    <a th:href="@{/user/toSelect}">跳转到user select页面</a>

    <div shiro:hasPermission="user:add"><!--只有具有相应权限才能显示-->
        具有user:add权限
    </div>
    <div shiro:hasPermission="user:delete">
        具有user:delete权限
    </div>
    <div shiro:hasPermission="user:update">
        具有user:update权限
    </div>
    <div shiro:hasPermission="user:select">
        具有user:select权限
    </div>
    <hr/>
    <div shiro:hasPermission="admin:add">
        具有admin:add权限
    </div>
    <div shiro:hasPermission="admin:delete">
        具有admin:delete权限
    </div>
    <div shiro:hasPermission="admin:update">
        具有admin:update权限
    </div>
    <div shiro:hasPermission="admin:select">
        具有admin:select权限
    </div>
    <hr/>
    <div shiro:hasPermission="singer:add">
        具有singer:add权限
    </div>
    <div shiro:hasPermission="singer:delete">
        具有singer:delete权限
    </div>
    <div shiro:hasPermission="singer:*">
        具有singer全部权限
    </div>
</body>
</html>